package ms.unicorn.dsl;

import ms.unicorn.dsl.runtime.ExecutionContext;

public interface ILanguageObject {
	static final int LANGUAGE = 0;
	static final int LANGUAGE_DIAGRAM = 1;
	static final int LANGUAGE_ENTITY = 2;
	static final int LANGUAGE_RELATION = 3;
	static final int LANGUAGE_THEME = 4;
	static final int LANGUAGE_CONVERTION_RULE = 5;
	
	// Shared properties
	static final String PROP_TEXT = "text";
	static final String PROP_DESCRIPTION = "description";
	static final String PROP_VIEW = "view";
	static final String PROP_FIGURE = "figure";
	
	// Diagram properties
	static final String EXTENSION = "ext";
	static final String PALETTE = "palette";
	
	// ModelLanguage properties
	static final String LANG_DIAGRAM_EXT = "ext";
	static final String LANG_ECORE_EXT = "ecore_ext";
	
	static final String LANG_DIAGRAM_EXT_DEFAULT = "diagram";
	static final String LANG_ECORE_EXT_DEFAULT = "unicorn";
	
	// ModelRelation properties
	static final String PROP_CONSTRAINTS = "constraints";
	static final String PROP_TARGET_DECORATOR = "decorator.target";
	static final String PROP_TARGET_DECORATION_LOCATOR = "decorator.target.locator";
	static final String PROP_SOURCE_DECORATOR = "decorator.source";
	static final String PROP_SOURCE_DECORATION_LOCATOR = "decorator.source.locator";
	
	String getId();
	
	String getName();
	
	String getText();
	
	int getObjectType();
	
	<T> T getElementProperty(String name, T defvalue, ExecutionContext context);
	
	<T> T getElementProperty(String name, T defvalue);
}
